## 样式
from docx import Document
from docx.enum.style import WD_STYLE_TYPE, WD_BUILTIN_STYLE
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT, WD_TAB_LEADER
from docx.oxml.ns import qn
from docx.shared import Pt, Inches

docx =Document()

for i in range(1,6):
    p = docx.add_paragraph(style=f'Heading {i}')
    p.paragraph_format.space_before= Pt(0)
    p.paragraph_format.space_after = Pt(0)
    p.paragraph_format.left_indent =Pt(i*10)
    p.add_run('一、四化项目')
docx.save(r'D:\Desktop\word\a.docx')